﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.EntityClient;

namespace PowerBooking.RSE.Utility.Helpers
{
    public class ConnectionHelper
    {
        public static string CreateConnectionString(string connectionStringName)
        {
            var entityBuilder = new EntityConnectionStringBuilder();
            entityBuilder.Provider = "System.Data.SqlClient";
            entityBuilder.ProviderConnectionString = EncryptHelper.Decrypt(AppSettingHelper.GetAppSetting<string>(connectionStringName));
            return entityBuilder.ToString();
        }
    }
}
